package com.spring.springboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.spring.springboot.entity.User;
import com.spring.springboot.query.UserQuery;
import com.spring.springboot.result.UserResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户(User)表数据库访问层
 *
 * @author 宋义州
 * @since 2022-07-23 01:41:45
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 查询详情
     *
     * @param id
     * @return 查询结果
     */
    UserResult selectByPrimaryKey(@Param("id") Long id);

    /**
     * 分页查询
     *
     * @param page
     * @param param
     * @return
     */
    Page<UserResult> selectByPage(Page<UserResult> page, @Param("param") UserQuery param);

}

